package com.ibeetl.admin.console.web.query.business;

import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.util.Tool;
import com.ibeetl.admin.core.util.enums.CoreDictType;
import com.ibeetl.admin.core.web.query.PageParam;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

public class ScoreDetailsQuery extends PageParam {

	@Query(name="用户Id",display=true)
	private String openid;
	
	@Query(name="微信昵称",display=true,fuzzy=true)
	private String nickname;
	// 透镜分类型 (1：赠送 ，2：直荐，3:转荐，4：充增， 5:充值，6：币转 ,7:过期，
	// 1000:身份证OCR扫描,2003:个人对外投资, 2004:个人涉诉查询 ，8000：个人综合报告，
	// 9000：企业涉诉信息 ，9001： 企业简版报告， 9002： 企业综合报告, 9003:企业工商信息))
	@Query(name="类型",display=true,type=Query.TYPE_DICT,dict= CoreDictType.SCORE_TYPE)
	private String type;

	//记录时间
	@Query(name="记录时间",display=true,type=Query.TYPE_DATE_BETWEEN)
	private String createTimeRange;
	private Date createTimeMin;
	private Date createTimeMax;

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getCreateTimeRange() {
		return createTimeRange;
	}

	public void setCreateTimeRange(String createTimeRange) {

		this.createTimeRange = createTimeRange;
		if(StringUtils.isEmpty(createTimeRange)) {
			return ;
		}
		Date[] ds = Tool.parseDataRange(createTimeRange);
		this.createTimeMin=ds[0];
		this.createTimeMax =ds[1];
	}

	public Date getCreateTimeMin() {
		return createTimeMin;
	}

	public void setCreateTimeMin(Date createTimeMin) {
		this.createTimeMin = createTimeMin;
	}

	public Date getCreateTimeMax() {
		return createTimeMax;
	}

	public void setCreateTimeMax(Date createTimeMax) {
		this.createTimeMax = createTimeMax;
	}
}
